package jtk.project4.fleet.field;

/*
* Author : Rio Dermawan 
* Date Created : 1-April-2011
* Date Modified : 6-April-2011
* Version : 1.1
* */

import java.awt.Dimension;

import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.CalendarControl;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.PushButton;

public class TripInformationEquipmentField extends GroupControl {
	private ComboField<String> DriverField;
	private TextField DestinationField;
	private TextField UDF1Field;
	private TextField UDF2Field;
	
	
	public TripInformationEquipmentField(String bindID){
		setTitle("header.TripInformationEquipment"); //disesuaikan dengan nama field
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields()
	{
		Dimension dimension = new Dimension(166, 20);
		DriverField = new ComboField<String>("DriverField","");
		DriverField.setPreferredSize(dimension);
		
		DestinationField = new TextField("DestinationField", 20);
		
		UDF1Field = new TextField("UDF1Field", 20);
		
		UDF2Field = new TextField("UDF2Field", 20);
		
	}
	
	private void createLayout()
	{
		setLayout(new FormLayout())

		.addLabel("label.Driver :")	 		.addField(DriverField)
		.addRow()
		.addLabel("label.Destination :")	 	.addField(DestinationField)
		.addRow()
		.addLabel("label.UDF #1 :") 			.addField(UDF1Field)
		.addRow()
		.addLabel("label.UDF #2 :")			.addField(UDF2Field);
	}
}
